<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<%@ include file="/WEB-INF/jsp/inc/taglibs.jsp"%>
		<%@ include file="/WEB-INF/jsp/inc/meta.jsp"%>
	</head>
	<body style="background: #E8F5FE; padding: 15px 18px;" class="scroll_r">
				
		<div id="right_w">
			<p>
				当前位置：额外费用管理 >> 上门维修
			</p>
		</div>
		<form action="${approot}/admin/cost/maintain_list/form/0" method="post" name="maintainForm">
		<table border="0" cellpadding="0" cellspacing="1" width="92%" align="center" id="add_tab">	
			<tr>
				<td colspan="10" style="text-align: left">
					用户编号：<input name="customCode" value="${maintainBean.customCode}"/>&nbsp;
					用户姓名：<input name="customName" value="${maintainBean.customName}"/>&nbsp;
					<input type="submit" value="查 询"/>&nbsp;
					<input type="button" onclick="location.href='${approot}/admin/cost/maintain_to_mod/add/0'" value="添 加"/>
				</td></tr>
		</table>
		</form>
			<c:choose>
				<c:when test="${fn:length(page.items)<1}">
				<div align="center"><font color='red'>对不起,暂时没有找到符合条件的数据!</font></div>
				</c:when>
				<c:otherwise> 
				<table border="0" cellpadding="" cellspacing="1" align="center"
					width="92%" id="web_tab">
					<tr>
						<th>
							序号
						</th>
						<th>
							用户编号
						</th>
						<th>
							用户姓名
						</th>
						<th>
							联系电话
						</th>
						<th>
							维修部位
						</th>
						<th>
							金额
						</th>
						<th>
							维修人
						</th>
						<th>
							维修日期
						</th>
						<th>
							操作
						</th>
					</tr>
				<c:forEach var="maintain" items="${page.items}" varStatus="index">
					<tr>
						<td>${index.index + 1}</td>
						<td>${maintain.customCode}</td>
						<td>${maintain.customName}</td>
						<td>${maintain.tel}</td>
						<td>${maintain.maintains}</td>
						<td>${maintain.price}</td>
						<td>${maintain.maintainer}</td>
						<td>${maintain.maintainDate}</td>
						<td>
							<a href="${approot}/admin/cost/maintain_to_mod/update/${maintain.id}">修改</a>
							<a href="javascript:if(confirm('确定要删除吗?'))location.href='${approot}/admin/cost/maintain_del/${maintain.id}'">删除</a>
						</td>
					</tr>
				</c:forEach>
					
					
				</table>

				<table border="0" cellpadding="0" cellspacing="1" width="92%"
					align="center">
					<tr>
						<td align="left">
							共有
							<font color='red'>${page.totalCount}</font> 条记录，当前第
							<font color='red'>${page.currentPage}</font>页，共
							<font color='red'>${page.pageCount}</font>页
						</td>
						<td align="right">
							转到
							<select name="topage" id="topage" onchange="window.location.href='${approot}/admin/cost/maintain_list/page/' + this.value">
								<c:forEach var="ind" items="${page.pages}">
									<option value="${(ind-1)*page.pageSize}"
										<c:if test="${ind==page.currentPage}">selected="selected"</c:if>>
										${ind}
									</option>
								</c:forEach>
							</select>
							<button class="but"
								onclick="window.location.href='${approot}/admin/cost/maintain_list/page/${page.firstIndex}'">
								首页
							</button>
							<button class="but"
								onclick="window.location.href='${approot}/admin/cost/maintain_list/page/${page.previousIndex}'">
								上一页
							</button>
							<c:forEach items="${page.showpages}" var="ind">
								<c:if test="${ind!=0}">
									<a
										href="${approot}/admin/cost/maintain_list/page/${(ind-1)*page.pageSize}">${ind}</a>
								</c:if>
							</c:forEach>
							<button class="but"
								onclick="window.location.href='${approot}/admin/cost/maintain_list/page/${page.nextIndex}'">
								下一页
							</button>
							<button class="but"
								onclick="window.location.href='${approot}/admin/cost/maintain_list/page/${page.lastIndex}'">
								末页
							</button>

						</td>
					</tr>
				</table></c:otherwise>
				</c:choose>
	</body>
</html>
